<?php

namespace app\admin\validate;

use app\common\enums\StatusEnum;
use think\Validate;

class CustomerService extends Validate
{
    protected $rule = [
        'name|姓名' => 'require|length:1,20',
        'phone|联系方式' => 'require|mobile',
        'oauth_phone|系统登录账号' => 'require|mobile',
        'qrcode' => 'require',
        'sort_num|权重' => 'number',
        'status|状态' => 'in:' . StatusEnum::DISABLED . ',' . StatusEnum::ENABLED,
    ];

    protected $message = [
        'qrcode' => '请上传图片',
    ];
}